import request from '@/utils/request'

// 查询;列表
export function listDriver(query) {
  return request({
    url: '/fincal/driver/list',
    method: 'get',
    params: query
  })
}
// 查询所有驾驶员数据
export function selectAllDriverlist(data) {
  return request({
    url: '/fincal/driver/selectAllDriverlist',
    method: 'post',
    data: data
  })
}
// 查询是否已经录入驾驶员数据
export function isDriverDataEntered(data) {
  return request({
    url: '/fincal/driver/isDriverDataEntered',
    method: 'post',
    data: data
  })
}
// 查询;详细
export function getDriver(id) {
  return request({
    url: '/fincal/driver/' + id,
    method: 'get'
  })
}

// 新增;
export function addDriver(data) {
  return request({
    url: '/fincal/driver',
    method: 'post',
    data: data
  })
}

// 修改;
export function updateDriver(data) {
  return request({
    url: '/fincal/driver',
    method: 'put',
    data: data
  })
}

// 删除;
export function delDriver(id) {
  return request({
    url: '/fincal/driver/' + id,
    method: 'delete'
  })
}
